Path: jade.tufts.edu!bu.edu!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!think.com!wupost!waikato.ac.nz!aukuni.ac.nz!kcbbs!kc From: Peter_Gutmann@kcbbs.gen.nz (Peter Gutmann) Newsgroups: sci.crypt Subject: Re: About "magic squares" Message-ID: <25517.829222906@kcbbs.gen.nz> Date: 23 Mar 92 07:05:17 GMT Organization: Kappa Crucis Unix BBS, Auckland, New Zealand Lines: 36 In article <1992Mar18.103506.8546@i2unix.dist.unige.it>, ab@dist.dist.unige.it (Alessandro Berni) writes: > A friend has shown me the following "magic square" > > 4 | 9 | 2 > --------- > 3 | 5 | 7 > --------- > 8 | 1 | 6 > > the sum of each row/colums/diagonal is 15. The question I was posed > was: "does it exists a rule to create a similar square with sum=17 or > sum=25" ? No (well, not as far as I know anyway:-). The formula for a generalized magic square is: a-c a-b+c a+b a+b+c a a-b-c a-b a+b-c a+c where 'a' is 1/3 of the magic number (thus the magic number has to be a multiple of 3). In addition, if the numbers of the square are to be consecutive positive integers, 'a' must be >= 5, 'b' must be 1, and 'c' must be 3. -- pgut1@cs.aukuni.ac.nz || peterg@kcbbs.gen.nz || peter@nacjack.gen.nz (In order of preference) Warning! Something large, scaly, and with fangs a foot long lives between and . Every now and then it kills and eats messages. If you don't receive a reply within a week, try resending...